<template>
	<om-page title="标签选择">
		<om-tags :selectTagsString="selectTagsString" :origTags="origTags" @confirm="confirFun"></om-tags>
	</om-page>
</template>
<script>
	export default {
		data() {
			return {
				selectTagsString:"",
				origTags:[]
			}
		},
		methods: {
			confirFun(e) {
				uni.setStorage({
					key:"select-tags",
					data:e.tags
				})
				uni.navigateBack()
			},
			initLoad(){
				let _that = this
				this.om.request("tbusiness/getBigClassNames").then(res=>{
					if(res.succeed){
						_that.origTags = res.value
					}
				})
			},
		},
		onLoad(e) {
			let _that = this
			if(e.addworktags){
				_that.selectTagsString = e.addworktags
			}
			_that.initLoad()
		}
	}
</script>
